package com.example.wechatbusiness.controller;

import com.example.wechatbusiness.config.Result;
import com.example.wechatbusiness.service.user.AdminService;
import com.example.wechatbusiness.utils.MD5;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class AdminController {
    @Resource
    AdminService adminService;

    @PostMapping("/login.html")
    public Result login(String userName,String password){
        return adminService.loginAdmin(userName, password);
    }

}
